﻿@{
    ViewBag.Title = "物品领用确认";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    @Html.Css("EditForm", "RightSeparateModule", "dp")
    @Html.Js("datepicker")
    <script type="text/javascript">

        $(function () {
            var mainheight = document.documentElement.clientHeight;
            var mainWidth = document.documentElement.clientWidth - 10;
            var gh = mainheight;
            var option = {
                height: gh,
                width: mainWidth,
                url: '@Url.Action("GetPrintList")',
                colModel: [
                     { display: 'ID', name: 'ID', width: 60, sortable: false, align: 'left', hide: true, iskey: true },
                     { display: '物品名称', name: 'Article_ID', width: 120, sortable: false, hide: false, align: 'left' },
                      { display: '规格', name: 'Article_Unit', width: 120, sortable: false, hide: false, align: 'left' },
                     { display: '领取日期', name: 'BringTime', width: 120, sortable: false, hide: false, align: 'left' },
                     { display: '领取数量', name: 'BringCount', width: 80, sortable: false, hide: false, align: 'left' },
                     { display: '领取人工号', name: 'PersonNo', width: 80, sortable: false, hide: false, align: 'left' },
                     { display: '领取人姓名', name: 'PersonName', width: 100, sortable: false, hide: false, align: 'left' }

               	],
                singleselected: false,
                sortname: "Sequence",
                sortorder: "asc",
                title: false,
                usepager: false,
                page: 1,
                rp: 20,
                rpoption: [10, 15, 20],
                showcheckbox: false,
                selectedonclick: true, //点击行是否选中
                rowbinddata: true,
                query: $("#hd").val()
            };
            var instockgrid = $("#bringList").flexigrid(option);

            $("#btnPrint").bind("click", function () {
                $("#btnPrint").css("display", "none");
                window.print();

            });

        });
    </script>
}
<div id="container">
    <div id="mainContent">
        <div class="title" style="height: 60px;">
        <input type="hidden" value='@ViewBag.query' id="hd" />
            <table width="80%">
                <tr>
                    <td>
                        姓名：
                    </td>
                    <td>@ViewBag.personName
                    </td>
                    <td>
                        工号：
                    </td>
                    <td>@ViewBag.personNo
                    </td>
                    <td>
                        卡 号：
                    </td>
                    <td>@ViewBag.cardNo
                    </td>
                </tr>
                <tr>
                    <td>
                        开始日期：
                    </td>
                    <td>@ViewBag.beginTime
                    </td>
                    <td>
                        结束日期：
                    </td>
                    <td>@ViewBag.endTime
                    </td>
                    <td colspan="2" align="right">
                        <input type="button" value="打印" id="btnPrint" style="width: 62px; height: 23px;" />
                    </td>
                </tr>
            </table>
        </div>
        <table id="bringList" style="display: none;width:80%;">
       
        </table>
        <table width="80%">
            <tr>
                <td align="left">
                    确认日期：
                </td>
                <td style="right: 15px">
                    确认人：
                </td>
            </tr>
        </table>
    </div>
</div>
